package net.zui.comp;

import java.awt.Graphics2D;

import net.zui.entity.ZImage;
import net.zui.entity.ZTextRender;
import net.zui.inter.IGroup;

public class ZLabel extends ZBase {
	protected ZImage image;
	protected ZTextRender text;

	public ZLabel(IGroup frame, int width, int height) {
		super(frame, width, height);
	}

	public ZLabel(String id, IGroup frame, int x, int y, int width, int height) {
		super(id, frame, x, y, width, height);
	}

	public ZLabel(String id, IGroup frame, int x, int y, int width, int height, int index) {
		super(id, frame, x, y, width, height, index);
	}

	@Override
	protected void draw(Graphics2D g) {
		if(image!=null)image.draw(g, this);
		if(text!=null)text.draw(g, this);
	}

	public ZImage getImage() {
		return image;
	}

	public void setImage(ZImage image) {
		this.image = image;
	}

	public ZTextRender getText() {
		return text;
	}

	public void setText(ZTextRender text) {
		this.text = text;
	}

}
